//package ServletDemo01;
//
//import util.GokJDBCUtil;
//
//import java.io.IOException;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * Servlet implementation class StudentEditServlet
// */
//@WebServlet("/edit")
//public class StudentEditServlet extends HttpServlet {
//	private static final long serialVersionUID = 1L;
//
//    /**
//     * @see HttpServlet#HttpServlet()
//     */
//    public StudentEditServlet() {
//        super();
//        // TODO Auto-generated constructor stub
//    }
//
//	/**
//	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
////		1.获取参数
//		String id=request.getParameter("id");
//		String name=request.getParameter("name");
//		String classes=request.getParameter("classes");
//
////		2.操作数据库  name,classes,id变量顺序跟？位置对应
//		int rusult = GokJDBCUtil.update("update student set name=? , classes=? where id=?", name,classes,id);
//
////		3.响应结果
//		if(rusult>0) {//操作成功
//			request.getRequestDispatcher("StudentList").forward(request, response);
//		}
//	}
//
//	/**
//	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		// TODO Auto-generated method stub
//		doGet(request, response);
//	}
//
//}
